home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Audio 4.94 - Over 11,000 Files
/
audio-11000.iso
/
mac
/
midi
/
cmmdtlkt.hqx
/
CMU Midi Toolkit 23Mar88
/
Moxc Stuff
/
echoes.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-03-23
|
443b
|
30 lines
#include "cmtprog.h"
#define delay 30
/* private functions: */
int echo (int, int, int);
private echo(chan, pitch, vel)
{
vel = vel - 5;
if (vel > 0) {
midi_note(chan, pitch, 0);
midi_note(chan, pitch, vel);
cause(delay, echo, chan, pitch, vel);
} else {
midi_note(chan, pitch, 0);
}
}
keydown(chan, pitch, vel)
{
midi_note(chan, pitch, 120);
cause(delay, echo, chan, pitch, 120);
}
mainscore()
{
cause(1000, mainscore);
}